package com.ysy.logistics.service.stock;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ysy.common.resp.ResultData;
import com.ysy.logistics.entities.echarts.PieTotal;
import com.ysy.logistics.entities.stock.InBoundList;
import com.ysy.logistics.entities.stock.StoreGoods;
import com.ysy.logistics.entities.stock.StoreHouse;
import com.ysy.logistics.entities.stock.dto.StoreGoodsDto;
import com.ysy.logistics.util.PageInfo;

import java.util.List;

/**
 * @ClassDescription:
 * @Author:姚斯羽
 * @Create:2025/4/3 17:42
 **/
public interface StoreGoodsService extends IService<StoreGoods> {
    /**
     * 保存入库单
     * @param addStoreGoodsList 入库单新增商品
     * @param updateStoreGoodsList 入库单修改商品
     * @param inBoundList 入库单
     * @param addStoreGoodsCapacity 新增商品容量
     */
    ResultData inbound(List<StoreGoods> addStoreGoodsList, List<StoreGoods> updateStoreGoodsList, InBoundList inBoundList, Integer addStoreGoodsCapacity);

    Page<StoreGoodsDto> listByPage(PageInfo<StoreGoodsDto> pageInfo);

    ResultData saveBackInBound(List<InBoundList> newInBoundList, List<StoreHouse> storeHouseList, List<StoreGoods> updateStoreGoodsList);

    List<PieTotal> goodsTypetotal();
}
